import React, { Component } from 'react'

export class SubCount extends Component {
  clickHandle(count){
    this.props.addClick(-count)
  }
  render () {
    return (
      <div>
        <button onClick={() => this.clickHandle(1)}>-1</button>
        <button onClick={() => this.clickHandle(5)}>-5</button>
        <button onClick={() => this.clickHandle(10)}>-10</button>
        </div>
    )
  }
}

export default SubCount